package abstractClass;

/**
 * Created by wangyg 
 * on 2017/3/20 17:35
 */
public class Test {
	public static void main(String[] args) throws ClassNotFoundException, IllegalAccessException,
			InstantiationException {
		Class aClass = Class.forName("abstractClass.class2");
		Object o = aClass.newInstance();;
		if (o instanceof TestAbstractInstance) {
			System.out.println("o is TestAbstractInstance 的实例");
		}
		if (TestAbstractInstance.class.isAssignableFrom(aClass)) {
			System.out.println("aClass is TestAbstractInsttance的子类");
		}
	}
}
